﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Fanfou
{
    partial class HeyRice
    {
        private static void LanguageConfig()
        {
            ShowBasicScreen();

            Console.WriteLine();
            Console.WriteLine(AppString.SYSTEM_SET_LANGUAGE);

            int userInput = Console.ReadKey(true).KeyChar;
            switch (userInput)
            {
                case 49:
                    AppString.isChinese = false;
                    break;
                case 50:
                    AppString.isChinese = true;
                    break;
            }
            AppString.SetAppString();

            ShowBasicScreen();
            Console.WriteLine(AppString.SYSTEM_MENU);
            Console.Write(AppString.SYSTEM_USER_COMMAND);
        }

        private static void SysConfig()
        {
            int width = Console.WindowWidth;
            string narrowStatus = null;
            string normalStatus = null;
            string wideStatus = null;

            switch (width)
            {
                case 120:
                    normalStatus = AppString.SYSTEM_SCREEN_CURRENT_RESOLUTION;
                    break;
                case 150:
                    wideStatus = AppString.SYSTEM_SCREEN_CURRENT_RESOLUTION;
                    break;
                case 100:
                    narrowStatus = AppString.SYSTEM_SCREEN_CURRENT_RESOLUTION;
                    break;
            }

            ShowBasicScreen();
            Console.WriteLine();
            Console.WriteLine(AppString.SYSTEM_USER_SET_RESOLUTION, narrowStatus, normalStatus, wideStatus);
            Console.WriteLine();
            
            int userInput = Console.ReadKey(true).KeyChar;
            switch (userInput)
            {
                case 49:
                    {
                        Console.WindowWidth = 100;
                        Console.BufferWidth = 100;
                    }
                    break;
                case 50:
                    {
                        Console.WindowWidth = 120;
                        Console.BufferWidth = 120;
                    }
                    break;
                case 51:
                    {
                        Console.WindowWidth = 150;
                        Console.BufferWidth = 150;
                    }
                    break;
            }

            ShowBasicScreen();
            Console.WriteLine(AppString.SYSTEM_MENU);
            Console.Write(AppString.SYSTEM_USER_COMMAND);
        }
    }
}
